1. Field of the Invention
The invention relates to using file system information in RAID data reconstruction and migration.
2. Related Art
One known method of maintaining mass storage in computer systems is called RAID (“Redundant Array of Inexpensive Disks”). RAID storage includes a group of disks, at least portions of which are used to store data and at least portions of which are used to store parity information associated with that data, in which the data and the parity are distributed across multiple disks. This allows a RAID storage system to reconstruct the original data (from the rest of the stored data and from the parity information) in the event that one of the disk blocks (which store data or parity) fails, or in the event that an entire disk fails. Data and parity are associated with each other in sets of disk blocks called RAID stripes.
One known problem with RAID storage is that, in the event a drive fails, the RAID storage system no longer has the same degree of redundancy, and must be adjusted if it is desired to maintain that same degree of redundancy. That is, it is desirable for the RAID storage system to allow a later second disk failure without loss of data, but it will not be possible to reconstruct data for two separate failed disks in a RAID stripe. To maintain the same degree of redundancy, the RAID storage system either has a spare disk onto which to reconstruct the data from the failed disk, or (if there is adequate available space) migrates data from the failed disk to other disks. In the latter case, parity associated with each RAID stripe must be adjusted in response to migration of allocated data. However, reconstruction of data and recalculation of parity involve substantial read and write operations with the disk drives, and it would be advantageous to minimize both the number of accesses to the disks and the amount of information transferred back and forth between the disks and the rest of the computer system.
Accordingly, it would be advantageous to provide a storage system (which might be a RAID storage system or another type of storage system) which maintains data reliability, allows for logical deletion of failed disks, and which minimizes the amount of computation and disk access to perform data migration or reconstruction, or parity adjustment. These advantages and others are provided in an embodiment of the invention, in which information maintained by the file system (including information regarding which disk blocks are actually in use recording stored data) is used in data reconstruction and migration, and recalculation of parity. Advantages of the invention in minimizing computation and disk access can also be used in normal operation of the storage system, as well as in mirroring entire storage volumes from a source to a target storage system.